feat(cookie): update @routup/cookie for routup v5#759
Conversation
|
Caution Review failedAn error occurred during the review process. Please try again later. 📝 WalkthroughWalkthroughThis pull request updates the Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Router as `@routup/router`
participant Handler as defineCoreHandler
participant Middleware as Cookie Handler
participant Next as event.next()
Client->>Router: fetch(Request with cookie header)
Router->>Handler: event-based handler execution
Handler->>Middleware: createHandler(event)
Middleware->>Middleware: hasRequestCookies(event)?
alt Cookies Present
Middleware->>Middleware: useRequestCookies(event)
Middleware->>Next: event.next()
else Cookies Absent
Middleware->>Middleware: parseRequestCookies(event)
Middleware->>Middleware: setRequestCookies(event, parsed)
Middleware->>Next: event.next()
end
Next-->>Handler: Response
Handler-->>Router: Response
Router-->>Client: HTTP Response with set-cookie headers
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/cookie/package.json`:
- Around line 54-60: The package's public API has a breaking change (cookie API
migrated to IRoutupEvent and dependency bumped to routup ^5.0.0-beta.3) but the
package.json "version" field still reflects the old major; update the "version"
field in package.json to a new major (e.g., 3.0.0) to follow semver, and update
any release notes/CHANGELOG entry to document the breaking change referencing
IRoutupEvent and the routup v5 migration so consumers are aware; also verify and
adjust any peerDependencies or compatibility notes related to "routup" if
present.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 1d828175-1c36-430e-ba12-3ac645a15654
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (8)
packages/assets/package.jsonpackages/cookie/package.jsonpackages/cookie/src/handler.tspackages/cookie/src/request.tspackages/cookie/src/response.tspackages/cookie/src/utils.tspackages/cookie/test/unit/module.spec.tspackages/swagger/package.json
| "routup": "^5.0.0-beta.3" | ||
| }, | ||
| "dependencies": { | ||
| "cookie-es": "^3.1.1" | ||
| }, | ||
| "devDependencies": { | ||
| "@types/supertest": "^7.2.0", | ||
| "routup": "^4.0.1", | ||
| "supertest": "^7.1.4" | ||
| "routup": "^5.0.0-beta.3" |
There was a problem hiding this comment.
Missing major version bump for a breaking API migration.
With routup moved to ^5.0.0-beta.3 and the cookie API migrated to IRoutupEvent, keeping package version 2.4.3 (Line 3) can violate semver expectations for consumers.
🔧 Proposed package version bump
- "version": "2.4.3",
+ "version": "3.0.0",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@packages/cookie/package.json` around lines 54 - 60, The package's public API
has a breaking change (cookie API migrated to IRoutupEvent and dependency bumped
to routup ^5.0.0-beta.3) but the package.json "version" field still reflects the
old major; update the "version" field in package.json to a new major (e.g.,
3.0.0) to follow semver, and update any release notes/CHANGELOG entry to
document the breaking change referencing IRoutupEvent and the routup v5
migration so consumers are aware; also verify and adjust any peerDependencies or
compatibility notes related to "routup" if present.
closes #744
Summary by CodeRabbit
Chores
routupdependency to version beta.3 across assets, cookie, and swagger packages.Refactor